package com.shelpe.services.simbasync.service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.shelpe.services.simbasync.model.RptCustomer;
import com.shelpe.services.simbasync.model.RptCustomerRealtime;
import com.shelpe.services.simbasync.model.SubwayTokens;
import com.shelpe.services.simbasync.model.Users;
import com.shelpe.services.simbasync.model.UsersWithBLOBs;
import com.shelpe.services.simbasync.service.simbaproxy.UserProxy.RptCustomerRealTimeDto;

public interface UserService {
	
	public int countAll();
	
	public Long createAndAddProxyUser(UsersWithBLOBs user);
	
	public int createAndAddPurchaseUser(UsersWithBLOBs user);
	
	public List<Users> getUserByNick(String nick);
	
	public List<Users> getAllUsers();
    
	public Users getUserByUserId(long userId);
    
    public Long getUserIdByNick(String nick);
    
    public String getNickByUserId(long userId);
	
    public int updateUser(Users user);
    
    public int updateUserSelective(Users user);
    
	public SubwayTokens getSubwayTokenByUserId(long userId);
	
	public SubwayTokens parseJsonToSubwayTokens(String response);
	
	public int deleteSubwayTokensById(long userId);
	
	public int updateSubwayTokens(SubwayTokens token);
	
	public int addSubwayTokens(SubwayTokens token);
	
	public Date getLastTimeFromRpt(long userId);
	
	public int countRptCustomerByDate(Date date);
	
	public int countRptCustomerByUserIdDate(long userId, Date date);
	
	public int addRptCustomer(RptCustomer rpt);
	
	public int deleteRptCustomerByDateRange(List<Long> userIds, Date startDate, Date endDate);
	
	public int insertRptCustomerBatch(List<RptCustomer> rptList);
	
	public int addRptCustomerList(List<RptCustomer> rptList);

	public List<RptCustomer> parseJsonToRptCustomerBase(String response);
	
	public int combineRptCustomerEffect(String response, Map<String, Integer> lastDayRecord, List<RptCustomer> list);
	
	public void UpdateRptCustomerData(long userId, List<RptCustomer> list);
	
	/***********************************************************/
	
	public int insertRptCustomerRealtime(RptCustomerRealtime rpt);
	
	public int insertRptCustomerRealtimeBatch(List<RptCustomerRealtime> list);
	
	public void convert(Long userId, List<RptCustomerRealTimeDto> dto, List<RptCustomerRealtime> rptRealTime);
	

}